package com.plian.system.controller.sys.per;

import com.plian.Tools.base.BaseController;
import com.plian.Tools.pagedata.PageData;
import com.plian.system.model.ListResult;
import com.plian.system.model.ObjResult;
import com.plian.system.service.sys.per.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 菜单树
 */
@RestController
@RequestMapping(value = "api/menu")
public class MenuTreeController extends BaseController {
    @Autowired
    MenuService menuService;
    /**
     * 获取当前账号下的菜单树
     * @return
     */
    @PostMapping(value = "getMenu")
    public ListResult<PageData> getMenu(){
        return menuService.getMenu();
    }
    @PostMapping(value = "getUrlUser")
    public ObjResult getUrlUser(@RequestBody PageData pd){
        return menuService.getUrlUser(pd);
    }
}
